<div class="flex-c hp100 border-box">
  <div class="search-box">
    <div class="condition-form">

      <el-form :inline="true" :model="formInline" ref="formInline" class="demo-form-inline">
        <el-form-item class="mr10" label="同意书名称" prop="TPL_MC">
          <el-input type="text" v-model.trim="formInline.TPL_MC" style="width: 250px;" clearable placeholder="请输入"
            @keyup.enter.native="search()"></el-input>
        </el-form-item>
        <el-form-item class="mr10" label="状态" prop="ZTBZ">
          <el-select v-model="formInline.ZTBZ" placeholder="请选择" clearable @change="search()">
            <el-option label="草稿" value="1">
            </el-option>
            <el-option label="已发布" value="2">
            </el-option>

          </el-select>
        </el-form-item>
        <template v-if="permission">
          <el-form-item class="mr10" label="所属科室" prop="ZKID">

            <el-select v-model="formInline.filter_zkid" filterable placeholder="请选择" clearable>
              <el-option :label="item.ZKMC" :value="item.ZKID" v-for="item in ZK_LIST" :key="item.ZKID">
              </el-option>
            </el-select>

          </el-form-item>
        </template>

        <el-form-item class="mr10">
          <el-button :disabled="listLoading" type="primary" @click="search()" icon="el-icon-search">查询
          </el-button>
          <el-button type="warning" @click="resetForm('formInline')" icon="el-icon-close">重置
          </el-button>
        </el-form-item>
      </el-form>

    </div>
  </div>
  <el-table :data="tableData" border class="wp100" empty-text="暂无相关数据" height="250" v-loading="listLoading">
    <el-table-column v-for="item in headers" :key="item.prop" :prop="item.prop" :label="item.label" :width="item.width">
    </el-table-column>



    <el-table-column label="排序">
      <template slot-scope="scope">
        <i class="el-icon-edit pointer" @click="editPx(scope.row)"></i>
        {{scope.row.PX}}
      </template>
    </el-table-column>

    <el-table-column label="状态">
      <template slot-scope="scope">
        <i class="el-icon-edit pointer" @click="eidtZtbz(scope.row)" v-show="scope.row.SIGN_CNT==0"></i>

        <span :class="{'color-danger': scope.row.ZTBZ==0,'color-success':scope.row.ZTBZ==2}">
          {{scope.row.ZTBZ_MC}}

        </span>
      </template>
    </el-table-column>



    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-link type="primary" v-if="scope.row.ZTBZ!=2 && permission==true" @click="editRow(scope.row)" class="mr5">编辑
        </el-link>
        <el-link type="primary"  @click="see(scope.row)" class="mr5">查看</el-link>
        <el-link type="warning" @click="copyItem(scope.row)" class="mr5" v-if="permission==true">复制</el-link>

        <el-link type="success" v-if="scope.row.ZTBZ==1" @click="publish(scope.row)" class="mr5">发布</el-link>



        <el-link type="danger" @click="deleteRow(scope.row)" v-if="scope.row.ZTBZ!=0 && permission==true" class="mr5">删除
        </el-link>




      </template>
    </el-table-column>
  </el-table>

  <pagination v-show="tableData.length>0" :total="listQuery.totalNum" :page.sync="listQuery.start"
    :limit.sync="listQuery.pageSize" @pagination="getList()" />

  <el-dialog v-el-drag-dialog :close-on-click-modal="false" width="400px" title="修改排序" :visible.sync="pxVisible">
    <div>
      排序：
      <el-input v-model.trim="pxObj.PX" placeholder="请输入数字"></el-input>
      <div class="mt30 text-c">
        <el-button @click="pxVisible=false">取消</el-button>

        <el-button type="primary" @click="savePx()">保存</el-button>

      </div>
    </div>

  </el-dialog>

  <!-- <el-dialog v-el-drag-dialog :close-on-click-modal="false" width="400px" title="修改状态" :visible.sync="ztbzVisible">
    <div>

      状态：

      <el-select v-model="ztbzObj.ZTBZ" placeholder="请选择" class="wp100">
        <el-option label="草稿" value="1">
        </el-option>
        <el-option label="已发布" value="2">
        </el-option>

      </el-select>


      <div class="mt30 text-c">
        <el-button @click="ztbzVisible=false">取消</el-button>

        <el-button type="primary" @click="saveZtbz()">保存</el-button>

      </div>
    </div>

  </el-dialog> -->
</div>